package com.xiaodu.acer.phoneplay.bean.downloadbean;


import zlc.season.rxdownload3.core.Mission;

public class DownloadMission extends Mission {


    private int mId;        //下载文件的id，必须➕

    private String mDisplayName;
    private String mVersionName;
    private String mPackageName;
    private String icon;

    private int mNeedAutoStart;

    private int Status; //查看当前app状态,数据在数据库里


    private boolean flag;   //防复用

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public DownloadMission(String url) {
        super(url);
    }

    /**
     * 和数据库交互，获取数据库传过来的数据
     * @param mission
     * @param displayName
     * @param versionName
     * @param packageName
     * @param id
     * @param icon
     * @param status
     */
    public DownloadMission(Mission mission, String displayName, String versionName,
                String packageName, int id, String icon,int status){
            super(mission);
            this.mId = id;
            this.setVersionName(versionName);
            this.setPackageName(packageName);
            this.setDisplayName(displayName);
            this.setIcon(icon);
            this.setStatus(status);
        }


    public int getId() {
        return mId;
    }

    public void setId(int id) {
        mId = id;
    }


    public String getDisplayName() {
        return mDisplayName;
    }

    public void setDisplayName(String displayName) {
        mDisplayName = displayName;
    }

    public String getVersionName() {
        return mVersionName;
    }

    public void setVersionName(String versionName) {
        mVersionName = versionName;
    }

    public String getPackageName() {
        return mPackageName;
    }

    public void setPackageName(String packageName) {
        mPackageName = packageName;
    }

    public void setNeedAutoStart(int needAutoStart) {
        mNeedAutoStart = needAutoStart;
    }

    public int getNeedAutoStart() {
        return mNeedAutoStart;
    }


    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getStatus() {
        return Status;
    }

    public void setStatus(int status) {
        Status = status;
    }

    @Override
    public String toString() {
        return "DownloadMission{" +
                "mId=" + mId +
                ", mDisplayName='" + mDisplayName + '\'' +
                ", mVersionName='" + mVersionName + '\'' +
                ", mPackageName='" + mPackageName + '\'' +
                ", icon='" + icon + '\'' +
                ", mNeedAutoStart=" + mNeedAutoStart +
                ", saveName=" + getSaveName() +
                ", url=" + getUrl() +
                ", flag=" + flag +
                '}';

    }
}
